package command;

/**
 * @author : DuJiabao
 * @Date : 2021/3/16 16:01
 * @Project : design-pattern
 * @File : null.java
 * @Desc :
 */
public class Client {
  public static void main(String[] args) {
    Light light = new Light();
    LightOnCommand lightOnCommand = new LightOnCommand(light);
    LightOffCommand lightOffCommand = new LightOffCommand(light);
    RemoteController remoteController = new RemoteController(3);
    remoteController.setCommand(0, lightOnCommand, lightOffCommand);
    remoteController.onButtonWasPushed(0);
    remoteController.offButtonWasPushed(0);
    remoteController.undoButtonWadPushed();
  }
}
